import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';

import { CourseComponent } from './course.component';
import { ListComponent } from './list/course-list.component';
import { EditComponent } from './edit/course-edit.component';
import { LookComponent } from './look/course-look.component';
import { LookTeacherComponent } from './lookTeacher/course-lookTeacher.component';
import { TeacherCourseComponent } from "./teacherCourse/teacher-course.component"
import { TeacherCourseReportComponent } from "./teacherCourseReport/teacher-course-report.component";
const routes: Routes = [{
    path: '',
    component: CourseComponent,
    children: [{
        path: 'list',
        component: ListComponent,
    },
    {
        path: 'edit',
        component: EditComponent,
    },
    {
        path: 'look',
        component: LookComponent,
    },
    {
        path: 'lookTeacher',
        component: LookTeacherComponent,
    },
    {
        path: 'teacherCourse',
        component: TeacherCourseComponent,
    },
    {
        path: 'teacherCourseReport',
        component: TeacherCourseReportComponent,
    },
    {
        path: '',
        redirectTo: 'list',
        pathMatch: 'full',
    }],
}
];

@NgModule({
    imports: [RouterModule.forChild(routes)],
    exports: [RouterModule],
})
export class CourseRoutingModule { }

export const routedComponents = [
    ListComponent,
    EditComponent,
    LookComponent,
    CourseComponent,
    LookTeacherComponent,
    TeacherCourseComponent,
    TeacherCourseReportComponent,
];
